package com.example.myyiyanmengjava.global;

import android.app.Application;

import com.example.myhttplibrary.global.GlobalConfig;
import com.example.myyiyanmengjava.http.BaseInterceptor;

import java.util.ArrayList;
import java.util.concurrent.TimeUnit;

import okhttp3.Interceptor;

public class ZhuFeApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        ArrayList<Interceptor> interceptors = new ArrayList<>();
        interceptors.add(new BaseInterceptor());
        GlobalConfig.getInstance().setBaseUrl("http://api.zhuge.com/")
                .setShowLog(true)
//                .setBaseparams(map)
                .setInterceptors(interceptors)
                .setTimeout(60)
                .setTimeUnit(TimeUnit.SECONDS);

    }
}
